package com.ktgj.customer.service.impl;

import java.util.List;
import com.ktgj.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ktgj.customer.mapper.TravelOrderPaymentRecordMapper;
import com.ktgj.customer.domain.TravelOrderPaymentRecord;
import com.ktgj.customer.service.ITravelOrderPaymentRecordService;

/**
 * 支付记录Service业务层处理
 * 
 * @author ruoyi
 * @date 2022-11-14
 */
@Service
public class TravelOrderPaymentRecordServiceImpl implements ITravelOrderPaymentRecordService 
{
    @Autowired
    private TravelOrderPaymentRecordMapper travelOrderPaymentRecordMapper;

    /**
     * 查询支付记录
     * 
     * @param payId 支付记录ID
     * @return 支付记录
     */
    @Override
    public TravelOrderPaymentRecord selectTravelOrderPaymentRecordById(Long payId)
    {
        return travelOrderPaymentRecordMapper.selectTravelOrderPaymentRecordById(payId);
    }

    /**
     * 查询支付记录列表
     * 
     * @param travelOrderPaymentRecord 支付记录
     * @return 支付记录
     */
    @Override
    public List<TravelOrderPaymentRecord> selectTravelOrderPaymentRecordList(TravelOrderPaymentRecord travelOrderPaymentRecord)
    {
        return travelOrderPaymentRecordMapper.selectTravelOrderPaymentRecordList(travelOrderPaymentRecord);
    }

    /**
     * 新增支付记录
     * 
     * @param travelOrderPaymentRecord 支付记录
     * @return 结果
     */
    @Override
    public int insertTravelOrderPaymentRecord(TravelOrderPaymentRecord travelOrderPaymentRecord)
    {
        travelOrderPaymentRecord.setCreateTime(DateUtils.getNowDate());
        return travelOrderPaymentRecordMapper.insertTravelOrderPaymentRecord(travelOrderPaymentRecord);
    }

    /**
     * 修改支付记录
     * 
     * @param travelOrderPaymentRecord 支付记录
     * @return 结果
     */
    @Override
    public int updateTravelOrderPaymentRecord(TravelOrderPaymentRecord travelOrderPaymentRecord)
    {
        return travelOrderPaymentRecordMapper.updateTravelOrderPaymentRecord(travelOrderPaymentRecord);
    }

    /**
     * 批量删除支付记录
     * 
     * @param payIds 需要删除的支付记录ID
     * @return 结果
     */
    @Override
    public int deleteTravelOrderPaymentRecordByIds(Long[] payIds)
    {
        return travelOrderPaymentRecordMapper.deleteTravelOrderPaymentRecordByIds(payIds);
    }

    /**
     * 删除支付记录信息
     * 
     * @param payId 支付记录ID
     * @return 结果
     */
    @Override
    public int deleteTravelOrderPaymentRecordById(Long payId)
    {
        return travelOrderPaymentRecordMapper.deleteTravelOrderPaymentRecordById(payId);
    }
}
